<div class="user_profile">
    <div id="name_profile" class="profile_element">
        <h2 class="label_profile">Nome: </h2>
        <div class="info_profile">
            <%=h @user.name %>
        </div>
    </div>
    <div id="surname_profile" class="profile_element">
        <h2 class="label_profile">Cognome: </h2>
        <div class="info_profile">
            <%=h @user.surname %>
        </div>
    </div>
	
	<div id="email_profile" class="profile_element">
        <h2 class="label_profile">Email: </h2>
        <div class="info_profile">
            <%=h @user.email %>
        </div>
    </div>
</div>

<%if current_user == @user%>
<script>
	
	$(function() {
		$.modal.close();
	});
	
	$('#name_profile').click(function() {
		doModal($("#name_modal"));
	});
	
	$('#surname_profile').click(function() {
		doModal($("#surname_modal"));
	});
	
	$('#email_profile').click(function() {
		doModal($("#email_modal"));
	});
	
</script>
<%end%>